// Copyright (c) Microsoft Corporation. All rights reserved. See License.txt in the project root for license information.
#include "pch.h"
#include "IntegerToStringTemperatureConverter.h"

using namespace Weathr;
using namespace Platform;
using namespace Windows::UI::Xaml::Interop;

Object^ IntegerToStringTemperatureConverter::Convert(Object^ value, TypeName targetType, Object^ parameter, String^ language)
{
    (void) targetType; // Unused parameter
    (void) parameter;  // Unused parameter
    (void) language;   // Unused parameter

    auto boxedInt32 = dynamic_cast<Box<int32>^>(value);
    if (boxedInt32 == nullptr)
    {
        return ref new String();
    }

    auto s = String::Concat(boxedInt32->Value.ToString(), L'\u00b0');
    return s;
}

Object^ IntegerToStringTemperatureConverter::ConvertBack(Object^ value, TypeName targetType, Object^ parameter, String^ language)
{
    (void) targetType; // Unused parameter
    (void) parameter;  // Unused parameter
    (void) language;   // Unused parameter

    throw ref new NotImplementedException();
}